import React, {Component} from 'react';
import cs from 'classnames'
import BaseCmpt from '../BaseCmpt';
import './index.css';

class ConnectKf extends BaseCmpt {

    static defaultProps = {
        data: {
            type: 107,
            isOnly: true,
            style: {},
            dataset: {},
            layout: {
                pos: 'right'
            },
        }
    };


    constructor(props) {
        super(props);
    }

    render() {
        const {onSelected, selected, data} = this.props;
        const {dataset, style, layout} = data;
        const pos = layout.pos || 'right';

        return (
            <div
                onClick={(e) => {
                    onSelected && onSelected(e)
                }}
                className={cs({
                    'connectKf cmptEle': true,
                    'cmptEle_selected': selected,
                    'connectKf_left': pos == 'left'
                })}
                style={style}
            >
                <div className="contact-wrap"></div>
                <div className="contact-describe">联系客服</div>
            </div>
        );
    }
}

export default ConnectKf;
